﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Site.Master" AutoEventWireup="true" CodeBehind="GiveScore.aspx.cs" Inherits="FortuneHeaven.Web.Pages.UserCenter.GiveScore" %>
<%@ Register Src="~/Controls/UserInforHead.ascx" TagPrefix="uc" TagName="UserInforHead" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link type="text/css" rel="stylesheet" href="../../Content/CSS/person.css" />
<script>
    $(document).ready(function () {
        $(".mark").keydown(function (event) {
            if (event.which == 13 && checkvalue()) {
                event.cancelBubble = true;
                event.returnValue = false;
                __doPostBack('<%=btnSave.ClientID.Replace("_","$")%>', '');

                return false;
            }
        });
    });
    function checkvalue() {
        var t1 = $('#<%=txtUserAcount.ClientID%>');
        var t2 = $('#<%=txtNumber.ClientID%>');
        var t3 = $('#<%=txtDBNumber.ClientID%>');
        if (!t1.val()) {
            alert("请输入好友帐号");
            return false;
        }
        
        if (!t2.val()) {
            alert("请输入赠送数量");
            return false;
        }
        if(isNaN(t2.val()))
        {
            alert("请输入有效数字");
            return false;
        }
        if (t3.val() != t2.val()) {
            alert("两次输入数量不一致");
            return false;
        }
        return true;
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="main">
       <div class="top"><span class="left">个人中心</span><span class="right">欢迎您，<asp:Literal id="ltName" runat="server"></asp:Literal></span></div>
      <div class="body">
         <uc:UserInforHead id="ucInforHead"  runat="server"></uc:UserInforHead>
         <div class="sendtit">
         <a href="javascript://">当前财富值：<em><asp:Literal ID="ltFortune" runat="server"></asp:Literal></em></a>
         <a href="javascript://">当前堂豆：<em><asp:Literal ID="ltScore" runat="server"></asp:Literal></em></a>
         <a href="javascript://">银行堂豆：<em><asp:Literal ID="ltInsurance" runat="server"></asp:Literal></em></a>
         </div>
         <div class="sendtitle">赠送给好友！(最低赠送2500堂豆)</div>
         <ul class="sendinput">
           <li><span class="left">请确认输入好友账号：</span><span class="right"><asp:TextBox ID="txtUserAcount" runat="server"></asp:TextBox></span></li>
           <li><span class="left">请输入赠送数量：</span><span class="right"><asp:TextBox ID="txtNumber" CssClass="short" runat="server"></asp:TextBox></span></li>
           <li><span class="left">请确认输入赠送数量：</span><span class="right"><asp:TextBox ID="txtDBNumber" CssClass="short mark" runat="server"></asp:TextBox></span></li>
           <li><span class="left"></span><span class="right">
            <asp:LinkButton ID="btnSave" CssClass="one" runat="server" OnClick="SubGiveScore" OnClientClick="return checkvalue();">提交</asp:LinkButton>
           <a class="two" href="<%= Page.ResolveUrl("~/Default.aspx")%>">返回</a>
           </span></li>
         </ul>
      </div>
    </div>
</asp:Content>
